import request from '@/utils/request'

// 查询种植地块列表
export function listPlot(query) {
  return request({
    url: '/plant/plot/list',
    method: 'get',
    params: query
  })
}

// 查询种植地块详细
export function getPlot(plotId) {
  return request({
    url: '/plant/plot/' + plotId,
    method: 'get'
  })
}

// 新增种植地块
export function addPlot(data) {
  return request({
    url: '/plant/plot',
    method: 'post',
    data: data
  })
}

// 修改种植地块
export function updatePlot(data) {
  return request({
    url: '/plant/plot',
    method: 'put',
    data: data
  })
}

// 删除种植地块
export function delPlot(plotId) {
  return request({
    url: '/plant/plot/' + plotId,
    method: 'delete'
  })
}
